<template>
	<view class="index">
		<view class="total-fund-wrapper">
			<view class="total-fund">
				<view class="label">
					总余额
				</view>
				<view class="fund">
					￥80000.00元
				</view>
			</view>
			<view class="fund-wrapper">
				<view class="item">
					<view class="label">
						待结算
					</view>
					<view class="fund">
						￥80000.00元
					</view>
				</view>
				<view class="item">
					<view class="label">
						可提现
					</view>
					<view class="fund">
						￥80000.00元
					</view>
				</view>
			</view>
		</view>
		<view class="tabs-wrapper">
			<v-tabs v-model="current" @change="changeTab" :tabs="tabList" :scroll="false" :bold="false"
				lineHeight="4rpx" lineColor="#0E932E" activeColor="#0E932E" color="#79838A" fontSize="30rpx"></v-tabs>
		</view>
		<view class="page-wrapper">
			<swiper class="swiper" :current="current" @change="changePage">
				<swiper-item class="swiper-item">
					<tradingDayStatement></tradingDayStatement>
				</swiper-item>
				<swiper-item class="swiper-item">
					<dailyStatement></dailyStatement>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import tradingDayStatement from '@/subPage_fund/tradingDayStatement.vue'
	import dailyStatement from '@/subPage_fund/dailyStatement.vue'

	export default {
		data() {
			return {
				current: 0,
				tabList: ['交易日结账单', '每日资金动账'],
			}
		},
		mounted() {

		},
		methods: {
			changeTab() {

			},
			changePage(e) {
				this.current = e.detail.current;
			}
		},
		components: {
			tradingDayStatement,
			dailyStatement
		}
	}
</script>

<style lang="scss" scoped>
	.index {
		height: 100%;

		.total-fund-wrapper {
			background-color: #383838;
			border-radius: 20upx;
			height: 360upx;
			color: #ffffff;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			margin: 10upx 0;

			.fund {
				font-weight: bold;
				margin-top: 10upx;
			}

			.total-fund {
				text-align: center;
				margin-bottom: 50upx;

				.fund {
					font-size: 40upx;
				}
			}

			.fund-wrapper {
				width: 100%;
				display: flex;
				align-items: center;

				.item {
					flex: 1;
					text-align: center;

					.fund {
						font-size: 34upx;
					}

					&:first-child {
						border-right: 1upx solid rgba(255, 255, 255, .5);
					}
				}
			}
		}

		.tabs-wrapper {
			background-color: #ffffff;
			padding: 10upx 0;
			margin-bottom: 20upx;
		}

		.swiper {
			height: calc(100vh - 490upx);

			.nodata-wrapper {
				text-align: center;
				font-size: 32upx;
				color: #666666;

				.nodata-image {
					margin-top: 300upx;
					margin-bottom: 10upx;
					width: 246upx;
				}

				.loading-image {
					margin-top: 300upx;
					margin-bottom: 10upx;
					width: 296upx;
					height: 205upx;
				}
			}
		}
	}
</style>